package br.org.bertol.mestrado;

import java.io.IOException;
import java.util.ArrayList;

import br.org.bertol.mestrado.engine.SearchEngine;
import br.org.bertol.mestrado.util.Configurator;

public abstract class Starter <E extends SearchEngine>{
	
	protected ArrayList<E> engineList;
	
	protected Configurator configurator;
	
	protected Starter(final Configurator configurator)
	{
		this.configurator = configurator;
		
		engineList = new ArrayList<E>();
	}
	
	public abstract void startEngine() throws InterruptedException;
	
	@SuppressWarnings("unchecked")
	public ArrayList<E> getEngineList()
	{
		return (ArrayList<E>) engineList.clone();
	}
	
	public abstract void save() throws IOException;
	
}
